package bairui.international.model.domain.jpa;

import com.lianjing.sh.model.uml.model.data.TBSuper_BaseIDAndTimeAndOrderValue;

/**
 *
 * (分公司员工)TB_BranchCompanyStaff
 *
 * @说明
 * <pre>

 * </pre>
 *
 * @see Help_TB_BranchCompanyStaff#inheritance() 继承体系信息
 *
 */
@org.hibernate.annotations.DynamicInsert
@org.hibernate.annotations.DynamicUpdate

@javax.persistence.Entity(name="t_branchCompanyStaff")
@com.lianjing.sh.processing.info.annotation.GenerateInfoModel
@SuppressWarnings("serial")
@com.lianjing.sh.model.common.annotation.Comment("分公司员工")
@com.lianjing.sh.processing.info.annotation.InfoComment("分公司员工")
public class TB_BranchCompanyStaff
 extends TBSuper_BaseIDAndTimeAndOrderValue
 implements 
	com.lianjing.sh.model.common.stardard.TableModel<Long>,
	java.io.Serializable

{

	
	
	/**
	 * 必须属性赋值接口
	 */
	public static interface MustProperties{
		/** 用户 */
		public bairui.international.model.domain.jpa.TB_User getUser();
		/** 分公司 */
		public bairui.international.model.domain.jpa.TB_BranchCompany getBranchCompany();
		/** 负责人标志 */
		public Boolean getDirectorFlag();
		/** 激活中标志 */
		public Boolean getActiveFlag();
		/** 总金额 */
		public Double getMoney();
		/** 可提现总金额 */
		public Double getWithdrawMoney();
	}
	
	/**
	 * 为必须属性赋值
	 */
	public TB_BranchCompanyStaff properties(MustProperties properties) {
		this.setUser(properties.getUser());
		this.setBranchCompany(properties.getBranchCompany());
		this.setDirectorFlag(properties.getDirectorFlag());
		this.setActiveFlag(properties.getActiveFlag());
		this.setMoney(properties.getMoney());
		this.setWithdrawMoney(properties.getWithdrawMoney());
		return this;
	}
	
	/**
	 *	必须属性构造函数
	 */
	public TB_BranchCompanyStaff(MustProperties properties) {
		this.properties(properties);
	}
	
	
	/**
	 * 可选单属性赋值接口
	 */
	public static interface OptionalSingleProperties{
		/** 上级 */
		public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getPrev();
		/** 二维码 */
		public String getDimensionalUrl();
	}
	
	/**
	 * 为可选单属性赋值
	 */
	public TB_BranchCompanyStaff properties(OptionalSingleProperties properties) {
		this.setPrev(properties.getPrev());
		this.setDimensionalUrl(properties.getDimensionalUrl());
		return this;
	}
	
	
	
	public TB_BranchCompanyStaff(MustProperties must, OptionalSingleProperties optionalSingle) {
		this.properties(must);
		this.properties(optionalSingle);
	}
	
	/**
	 * 仅当前必须属性赋值接口
	 */
	public static interface CurrentMustProperties{
		/** 用户 */
		public bairui.international.model.domain.jpa.TB_User getUser();
		/** 分公司 */
		public bairui.international.model.domain.jpa.TB_BranchCompany getBranchCompany();
		/** 负责人标志 */
		public Boolean getDirectorFlag();
		/** 激活中标志 */
		public Boolean getActiveFlag();
		/** 总金额 */
		public Double getMoney();
		/** 可提现总金额 */
		public Double getWithdrawMoney();
	}
	
	/**
	 * 为仅当前必须属性赋值
	 */
	public TB_BranchCompanyStaff properties(CurrentMustProperties properties) {
		this.setUser(properties.getUser());
		this.setBranchCompany(properties.getBranchCompany());
		this.setDirectorFlag(properties.getDirectorFlag());
		this.setActiveFlag(properties.getActiveFlag());
		this.setMoney(properties.getMoney());
		this.setWithdrawMoney(properties.getWithdrawMoney());
		return this;
	}
	
	/**
	 * 仅当前可选单属性赋值接口
	 */
	public static interface CurrentOptionalSingleProperties{
		/** 上级 */
		public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getPrev();
		/** 二维码 */
		public String getDimensionalUrl();
	}
	
	/**
	 * 为仅当前可选单属性赋值
	 */
	public TB_BranchCompanyStaff properties(CurrentOptionalSingleProperties properties) {
		this.setPrev(properties.getPrev());
		this.setDimensionalUrl(properties.getDimensionalUrl());
		return this;
	}
	
	public TB_BranchCompanyStaff(
		@lombok.NonNull com.lianjing.sh.model.uml.model.data.TBSuper_BaseIDAndTimeAndOrderValue bean,
		CurrentMustProperties mustProperties,
		CurrentOptionalSingleProperties optionalProperties
	) {
		this(bean);
		this.properties(mustProperties);
		this.properties(optionalProperties);
	}
	
	public TB_BranchCompanyStaff(
		@lombok.NonNull com.lianjing.sh.model.uml.model.data.TBSuper_BaseIDAndTimeAndOrderValue bean
	) {
		update(bean);
	}
	
	public TB_BranchCompanyStaff update(com.lianjing.sh.model.uml.model.data.TBSuper_BaseIDAndTimeAndOrderValue bean){
		this.setId(bean.getId());
		this.setCreateTime(bean.getCreateTime());
		this.setModifyTime(bean.getModifyTime());
		this.setOrderValue(bean.getOrderValue());
		return this;
	}
	
	
	/**
	 * 更新属性内部类
	 */
	public abstract class UpdateProperties {
	
		public UpdateProperties() throws Exception {
			Integer orderValue = getOrderValue(TB_BranchCompanyStaff.this);
			if(isOverride_getOrderValue){
				TB_BranchCompanyStaff.this.setOrderValue(orderValue);
			}
	
			bairui.international.model.domain.jpa.TB_User user = getUser(TB_BranchCompanyStaff.this);
			if(isOverride_getUser){
				TB_BranchCompanyStaff.this.setUser(user);
			}
	
			bairui.international.model.domain.jpa.TB_BranchCompany branchCompany = getBranchCompany(TB_BranchCompanyStaff.this);
			if(isOverride_getBranchCompany){
				TB_BranchCompanyStaff.this.setBranchCompany(branchCompany);
			}
	
			Boolean directorFlag = getDirectorFlag(TB_BranchCompanyStaff.this);
			if(isOverride_getDirectorFlag){
				TB_BranchCompanyStaff.this.setDirectorFlag(directorFlag);
			}
	
			bairui.international.model.domain.jpa.TB_BranchCompanyStaff prev = getPrev(TB_BranchCompanyStaff.this);
			if(isOverride_getPrev){
				TB_BranchCompanyStaff.this.setPrev(prev);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> nexts = getNexts(TB_BranchCompanyStaff.this);
			if(isOverride_getNexts){
				TB_BranchCompanyStaff.this.setNexts(nexts);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> assignOrders = getAssignOrders(TB_BranchCompanyStaff.this);
			if(isOverride_getAssignOrders){
				TB_BranchCompanyStaff.this.setAssignOrders(assignOrders);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> sendOrders = getSendOrders(TB_BranchCompanyStaff.this);
			if(isOverride_getSendOrders){
				TB_BranchCompanyStaff.this.setSendOrders(sendOrders);
			}
	
			Boolean activeFlag = getActiveFlag(TB_BranchCompanyStaff.this);
			if(isOverride_getActiveFlag){
				TB_BranchCompanyStaff.this.setActiveFlag(activeFlag);
			}
	
			Double money = getMoney(TB_BranchCompanyStaff.this);
			if(isOverride_getMoney){
				TB_BranchCompanyStaff.this.setMoney(money);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord> branchCompanyStaffRoyaltyRecords = getBranchCompanyStaffRoyaltyRecords(TB_BranchCompanyStaff.this);
			if(isOverride_getBranchCompanyStaffRoyaltyRecords){
				TB_BranchCompanyStaff.this.setBranchCompanyStaffRoyaltyRecords(branchCompanyStaffRoyaltyRecords);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord> branchCompanyStaffMoneyRecords = getBranchCompanyStaffMoneyRecords(TB_BranchCompanyStaff.this);
			if(isOverride_getBranchCompanyStaffMoneyRecords){
				TB_BranchCompanyStaff.this.setBranchCompanyStaffMoneyRecords(branchCompanyStaffMoneyRecords);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder> branchCompanyStaffWithdrawOrders = getBranchCompanyStaffWithdrawOrders(TB_BranchCompanyStaff.this);
			if(isOverride_getBranchCompanyStaffWithdrawOrders){
				TB_BranchCompanyStaff.this.setBranchCompanyStaffWithdrawOrders(branchCompanyStaffWithdrawOrders);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyMoneyRecord> branchCompanyMoneyRecords = getBranchCompanyMoneyRecords(TB_BranchCompanyStaff.this);
			if(isOverride_getBranchCompanyMoneyRecords){
				TB_BranchCompanyStaff.this.setBranchCompanyMoneyRecords(branchCompanyMoneyRecords);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyWithdrawOrder> branchCompanyWithdrawOrders = getBranchCompanyWithdrawOrders(TB_BranchCompanyStaff.this);
			if(isOverride_getBranchCompanyWithdrawOrders){
				TB_BranchCompanyStaff.this.setBranchCompanyWithdrawOrders(branchCompanyWithdrawOrders);
			}
	
			Double withdrawMoney = getWithdrawMoney(TB_BranchCompanyStaff.this);
			if(isOverride_getWithdrawMoney){
				TB_BranchCompanyStaff.this.setWithdrawMoney(withdrawMoney);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder> verifiedWithdrawOrders = getVerifiedWithdrawOrders(TB_BranchCompanyStaff.this);
			if(isOverride_getVerifiedWithdrawOrders){
				TB_BranchCompanyStaff.this.setVerifiedWithdrawOrders(verifiedWithdrawOrders);
			}
	
			String dimensionalUrl = getDimensionalUrl(TB_BranchCompanyStaff.this);
			if(isOverride_getDimensionalUrl){
				TB_BranchCompanyStaff.this.setDimensionalUrl(dimensionalUrl);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_User> customers = getCustomers(TB_BranchCompanyStaff.this);
			if(isOverride_getCustomers){
				TB_BranchCompanyStaff.this.setCustomers(customers);
			}
		}
	
		public TB_BranchCompanyStaff up(){
			return TB_BranchCompanyStaff.this;
		}
	
		/** 排序值 */
		private boolean isOverride_getOrderValue = true;
		public Integer getOrderValue(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getOrderValue = false; 
			return null;
		}
		/** 用户 */
		private boolean isOverride_getUser = true;
		public bairui.international.model.domain.jpa.TB_User getUser(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getUser = false; 
			return null;
		}
		/** 分公司 */
		private boolean isOverride_getBranchCompany = true;
		public bairui.international.model.domain.jpa.TB_BranchCompany getBranchCompany(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getBranchCompany = false; 
			return null;
		}
		/** 负责人标志 */
		private boolean isOverride_getDirectorFlag = true;
		public Boolean getDirectorFlag(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getDirectorFlag = false; 
			return null;
		}
		/** 上级 */
		private boolean isOverride_getPrev = true;
		public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getPrev(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getPrev = false; 
			return null;
		}
		/** 下级 */
		private boolean isOverride_getNexts = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> getNexts(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getNexts = false; 
			return null;
		}
		/** 分配的订单 */
		private boolean isOverride_getAssignOrders = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> getAssignOrders(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getAssignOrders = false; 
			return null;
		}
		/** 配送的订单 */
		private boolean isOverride_getSendOrders = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> getSendOrders(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getSendOrders = false; 
			return null;
		}
		/** 激活中标志 */
		private boolean isOverride_getActiveFlag = true;
		public Boolean getActiveFlag(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getActiveFlag = false; 
			return null;
		}
		/** 总金额 */
		private boolean isOverride_getMoney = true;
		public Double getMoney(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getMoney = false; 
			return null;
		}
		/** 分公司员工提成记录 */
		private boolean isOverride_getBranchCompanyStaffRoyaltyRecords = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord> getBranchCompanyStaffRoyaltyRecords(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getBranchCompanyStaffRoyaltyRecords = false; 
			return null;
		}
		/** 分公司员工金额记录 */
		private boolean isOverride_getBranchCompanyStaffMoneyRecords = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord> getBranchCompanyStaffMoneyRecords(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getBranchCompanyStaffMoneyRecords = false; 
			return null;
		}
		/** 分公司员工提现单 */
		private boolean isOverride_getBranchCompanyStaffWithdrawOrders = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder> getBranchCompanyStaffWithdrawOrders(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getBranchCompanyStaffWithdrawOrders = false; 
			return null;
		}
		/** 分公司金额记录 */
		private boolean isOverride_getBranchCompanyMoneyRecords = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyMoneyRecord> getBranchCompanyMoneyRecords(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getBranchCompanyMoneyRecords = false; 
			return null;
		}
		/** 分公司提现单 */
		private boolean isOverride_getBranchCompanyWithdrawOrders = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyWithdrawOrder> getBranchCompanyWithdrawOrders(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getBranchCompanyWithdrawOrders = false; 
			return null;
		}
		/** 可提现总金额 */
		private boolean isOverride_getWithdrawMoney = true;
		public Double getWithdrawMoney(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getWithdrawMoney = false; 
			return null;
		}
		/** 审核的提现单 */
		private boolean isOverride_getVerifiedWithdrawOrders = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder> getVerifiedWithdrawOrders(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getVerifiedWithdrawOrders = false; 
			return null;
		}
		/** 二维码 */
		private boolean isOverride_getDimensionalUrl = true;
		public String getDimensionalUrl(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getDimensionalUrl = false; 
			return null;
		}
		/** 客户 */
		private boolean isOverride_getCustomers = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_User> getCustomers(TB_BranchCompanyStaff it) throws Exception { 
			isOverride_getCustomers = false; 
			return null;
		}
	
	}
	
	
	/**
	 * 构造函数
	 */
	public TB_BranchCompanyStaff() {
	}
	
	public TB_BranchCompanyStaff(
		@lombok.NonNull Long id
	) {
		this.setId(id);
	}
	
	public TB_BranchCompanyStaff(
		@lombok.NonNull TB_BranchCompanyStaff bean
	) {
		this.setId(bean.getId());
		this.setCreateTime(bean.getCreateTime());
		this.setModifyTime(bean.getModifyTime());
		this.setOrderValue(bean.getOrderValue());
		this.setUser(bean.getUser());
		this.setBranchCompany(bean.getBranchCompany());
		this.setDirectorFlag(bean.getDirectorFlag());
		this.setPrev(bean.getPrev());
		this.setNexts(bean.getNexts());
		this.setAssignOrders(bean.getAssignOrders());
		this.setSendOrders(bean.getSendOrders());
		this.setActiveFlag(bean.getActiveFlag());
		this.setMoney(bean.getMoney());
		this.setCreator(bean.getCreator());
		this.setLastModifier(bean.getLastModifier());
		this.setBranchCompanyStaffRoyaltyRecords(bean.getBranchCompanyStaffRoyaltyRecords());
		this.setBranchCompanyStaffMoneyRecords(bean.getBranchCompanyStaffMoneyRecords());
		this.setBranchCompanyStaffWithdrawOrders(bean.getBranchCompanyStaffWithdrawOrders());
		this.setBranchCompanyMoneyRecords(bean.getBranchCompanyMoneyRecords());
		this.setBranchCompanyWithdrawOrders(bean.getBranchCompanyWithdrawOrders());
		this.setWithdrawMoney(bean.getWithdrawMoney());
		this.setVerifiedWithdrawOrders(bean.getVerifiedWithdrawOrders());
		this.setDimensionalUrl(bean.getDimensionalUrl());
		this.setCustomers(bean.getCustomers());
	}
	
	

	


	/**
	 * 属性
	 */
	@com.lianjing.sh.model.common.annotation.Comment("用户")
	@com.lianjing.sh.processing.info.annotation.InfoComment("用户")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.ManyToOne(optional=false)
	private bairui.international.model.domain.jpa.TB_User user;

	@com.lianjing.sh.model.common.annotation.Comment("分公司")
	@com.lianjing.sh.processing.info.annotation.InfoComment("分公司")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.ManyToOne(optional=false)
	private bairui.international.model.domain.jpa.TB_BranchCompany branchCompany;

	@com.lianjing.sh.model.common.annotation.Comment("负责人标志")
	@com.lianjing.sh.processing.info.annotation.InfoComment("负责人标志")
	@javax.persistence.Column(name="directorFlag", nullable=false)
	private Boolean directorFlag;

	@com.lianjing.sh.model.common.annotation.Comment("上级")
	@com.lianjing.sh.processing.info.annotation.InfoComment("上级")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.ManyToOne()
	private bairui.international.model.domain.jpa.TB_BranchCompanyStaff prev;

	@com.lianjing.sh.model.common.annotation.Comment("下级")
	@com.lianjing.sh.processing.info.annotation.InfoComment("下级")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="prev")
	private java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> nexts;

	@com.lianjing.sh.model.common.annotation.Comment("分配的订单")
	@com.lianjing.sh.processing.info.annotation.InfoComment("分配的订单")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="assignor")
	private java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> assignOrders;

	@com.lianjing.sh.model.common.annotation.Comment("配送的订单")
	@com.lianjing.sh.processing.info.annotation.InfoComment("配送的订单")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="sender")
	private java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> sendOrders;

	@com.lianjing.sh.model.common.annotation.Comment("激活中标志")
	@com.lianjing.sh.processing.info.annotation.InfoComment("激活中标志")
	@javax.persistence.Column(name="activeFlag", nullable=false)
	private Boolean activeFlag;

	@com.lianjing.sh.model.common.annotation.Comment("总金额")
	@com.lianjing.sh.processing.info.annotation.InfoComment("总金额")
	@javax.persistence.Column(name="money", nullable=false)
	private Double money;

	@com.lianjing.sh.model.common.annotation.Comment("创建者")
	@com.lianjing.sh.processing.info.annotation.InfoComment("创建者")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.JoinColumn(name="creator_id", nullable=true)
	@javax.persistence.ManyToOne()
	private bairui.international.model.domain.jpa.TB_Admin creator;

	@com.lianjing.sh.model.common.annotation.Comment("最后修改者")
	@com.lianjing.sh.processing.info.annotation.InfoComment("最后修改者")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.JoinColumn(name="lastModifier_id", nullable=true)
	@javax.persistence.ManyToOne()
	private bairui.international.model.domain.jpa.TB_Admin lastModifier;

	@com.lianjing.sh.model.common.annotation.Comment("分公司员工提成记录")
	@com.lianjing.sh.processing.info.annotation.InfoComment("分公司员工提成记录")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="branchCompanyStaff")
	private java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord> branchCompanyStaffRoyaltyRecords;

	@com.lianjing.sh.model.common.annotation.Comment("分公司员工金额记录")
	@com.lianjing.sh.processing.info.annotation.InfoComment("分公司员工金额记录")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="branchCompanyStaff")
	private java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord> branchCompanyStaffMoneyRecords;

	@com.lianjing.sh.model.common.annotation.Comment("分公司员工提现单")
	@com.lianjing.sh.processing.info.annotation.InfoComment("分公司员工提现单")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="branchCompanyStaff")
	private java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder> branchCompanyStaffWithdrawOrders;

	@com.lianjing.sh.model.common.annotation.Comment("分公司金额记录")
	@com.lianjing.sh.processing.info.annotation.InfoComment("分公司金额记录")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="branchCompanyStaff")
	private java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyMoneyRecord> branchCompanyMoneyRecords;

	@com.lianjing.sh.model.common.annotation.Comment("分公司提现单")
	@com.lianjing.sh.processing.info.annotation.InfoComment("分公司提现单")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="branchCompanyStaff")
	private java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyWithdrawOrder> branchCompanyWithdrawOrders;

	@com.lianjing.sh.model.common.annotation.Comment("可提现总金额")
	@com.lianjing.sh.processing.info.annotation.InfoComment("可提现总金额")
	@javax.persistence.Column(name="withdrawMoney", nullable=false)
	private Double withdrawMoney;

	@com.lianjing.sh.model.common.annotation.Comment("审核的提现单")
	@com.lianjing.sh.processing.info.annotation.InfoComment("审核的提现单")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="verifior")
	private java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder> verifiedWithdrawOrders;

	@com.lianjing.sh.model.common.annotation.Comment("二维码")
	@com.lianjing.sh.processing.info.annotation.InfoComment("二维码")
	@javax.persistence.Column(name="dimensionalUrl", length=255)
	private String dimensionalUrl;

	@com.lianjing.sh.model.common.annotation.Comment("客户")
	@com.lianjing.sh.processing.info.annotation.InfoComment("客户")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="sender")
	private java.util.List<bairui.international.model.domain.jpa.TB_User> customers;

	/** get[用户] */
	public bairui.international.model.domain.jpa.TB_User getUser() {
		return this.user;
	}

	/** get[分公司] */
	public bairui.international.model.domain.jpa.TB_BranchCompany getBranchCompany() {
		return this.branchCompany;
	}

	/** get[负责人标志] */
	public Boolean getDirectorFlag() {
		return this.directorFlag;
	}

	/** get[上级] */
	public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getPrev() {
		return this.prev;
	}

	/** get[下级] */
	public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> getNexts() {
		return this.nexts;
	}

	/** get[分配的订单] */
	public java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> getAssignOrders() {
		return this.assignOrders;
	}

	/** get[配送的订单] */
	public java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> getSendOrders() {
		return this.sendOrders;
	}

	/** get[激活中标志] */
	public Boolean getActiveFlag() {
		return this.activeFlag;
	}

	/** get[总金额] */
	public Double getMoney() {
		return this.money;
	}

	/** get[创建者] */
	public bairui.international.model.domain.jpa.TB_Admin getCreator() {
		return this.creator;
	}

	/** get[最后修改者] */
	public bairui.international.model.domain.jpa.TB_Admin getLastModifier() {
		return this.lastModifier;
	}

	/** get[分公司员工提成记录] */
	public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord> getBranchCompanyStaffRoyaltyRecords() {
		return this.branchCompanyStaffRoyaltyRecords;
	}

	/** get[分公司员工金额记录] */
	public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord> getBranchCompanyStaffMoneyRecords() {
		return this.branchCompanyStaffMoneyRecords;
	}

	/** get[分公司员工提现单] */
	public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder> getBranchCompanyStaffWithdrawOrders() {
		return this.branchCompanyStaffWithdrawOrders;
	}

	/** get[分公司金额记录] */
	public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyMoneyRecord> getBranchCompanyMoneyRecords() {
		return this.branchCompanyMoneyRecords;
	}

	/** get[分公司提现单] */
	public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyWithdrawOrder> getBranchCompanyWithdrawOrders() {
		return this.branchCompanyWithdrawOrders;
	}

	/** get[可提现总金额] */
	public Double getWithdrawMoney() {
		return this.withdrawMoney;
	}

	/** get[审核的提现单] */
	public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder> getVerifiedWithdrawOrders() {
		return this.verifiedWithdrawOrders;
	}

	/** get[二维码] */
	public String getDimensionalUrl() {
		return this.dimensionalUrl;
	}

	/** get[客户] */
	public java.util.List<bairui.international.model.domain.jpa.TB_User> getCustomers() {
		return this.customers;
	}

	/** set[用户] */
	public void setUser(bairui.international.model.domain.jpa.TB_User user) {
		this.user = user;
	}

	/** set[分公司] */
	public void setBranchCompany(bairui.international.model.domain.jpa.TB_BranchCompany branchCompany) {
		this.branchCompany = branchCompany;
	}

	/** set[负责人标志] */
	public void setDirectorFlag(Boolean directorFlag) {
		this.directorFlag = directorFlag;
	}

	/** set[上级] */
	public void setPrev(bairui.international.model.domain.jpa.TB_BranchCompanyStaff prev) {
		this.prev = prev;
	}

	/** set[下级] */
	public void setNexts(java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> nexts) {
		this.nexts = nexts;
	}

	/** set[分配的订单] */
	public void setAssignOrders(java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> assignOrders) {
		this.assignOrders = assignOrders;
	}

	/** set[配送的订单] */
	public void setSendOrders(java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> sendOrders) {
		this.sendOrders = sendOrders;
	}

	/** set[激活中标志] */
	public void setActiveFlag(Boolean activeFlag) {
		this.activeFlag = activeFlag;
	}

	/** set[总金额] */
	public void setMoney(Double money) {
		this.money = money;
	}

	/** set[创建者] */
	public void setCreator(bairui.international.model.domain.jpa.TB_Admin creator) {
		this.creator = creator;
	}

	/** set[最后修改者] */
	public void setLastModifier(bairui.international.model.domain.jpa.TB_Admin lastModifier) {
		this.lastModifier = lastModifier;
	}

	/** set[分公司员工提成记录] */
	public void setBranchCompanyStaffRoyaltyRecords(java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord> branchCompanyStaffRoyaltyRecords) {
		this.branchCompanyStaffRoyaltyRecords = branchCompanyStaffRoyaltyRecords;
	}

	/** set[分公司员工金额记录] */
	public void setBranchCompanyStaffMoneyRecords(java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord> branchCompanyStaffMoneyRecords) {
		this.branchCompanyStaffMoneyRecords = branchCompanyStaffMoneyRecords;
	}

	/** set[分公司员工提现单] */
	public void setBranchCompanyStaffWithdrawOrders(java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder> branchCompanyStaffWithdrawOrders) {
		this.branchCompanyStaffWithdrawOrders = branchCompanyStaffWithdrawOrders;
	}

	/** set[分公司金额记录] */
	public void setBranchCompanyMoneyRecords(java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyMoneyRecord> branchCompanyMoneyRecords) {
		this.branchCompanyMoneyRecords = branchCompanyMoneyRecords;
	}

	/** set[分公司提现单] */
	public void setBranchCompanyWithdrawOrders(java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyWithdrawOrder> branchCompanyWithdrawOrders) {
		this.branchCompanyWithdrawOrders = branchCompanyWithdrawOrders;
	}

	/** set[可提现总金额] */
	public void setWithdrawMoney(Double withdrawMoney) {
		this.withdrawMoney = withdrawMoney;
	}

	/** set[审核的提现单] */
	public void setVerifiedWithdrawOrders(java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder> verifiedWithdrawOrders) {
		this.verifiedWithdrawOrders = verifiedWithdrawOrders;
	}

	/** set[二维码] */
	public void setDimensionalUrl(String dimensionalUrl) {
		this.dimensionalUrl = dimensionalUrl;
	}

	/** set[客户] */
	public void setCustomers(java.util.List<bairui.international.model.domain.jpa.TB_User> customers) {
		this.customers = customers;
	}

	public void assignUser(bairui.international.model.domain.jpa.TB_User user) {
		if(null != user){
			user.addBranchCompanyStaffs(this);
		}
		this.setUser(user);
	}
	

	public void assignBranchCompany(bairui.international.model.domain.jpa.TB_BranchCompany branchCompany) {
		if(null != branchCompany){
			branchCompany.addBranchCompanyStaffs(this);
		}
		this.setBranchCompany(branchCompany);
	}
	

	public void assignPrev(bairui.international.model.domain.jpa.TB_BranchCompanyStaff prev) {
		if(null != prev){
			prev.addNexts(this);
		}
		this.setPrev(prev);
	}
	













	/** add[Nexts] */
	public TB_BranchCompanyStaff addNexts(bairui.international.model.domain.jpa.TB_BranchCompanyStaff ... nexts){
		if(this.nexts == null){
			this.nexts = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaff bean : nexts){
			bean.setPrev(this);
			this.nexts.add(bean);
		}
		return this;
	}
	/** add[AssignOrders] */
	public TB_BranchCompanyStaff addAssignOrders(bairui.international.model.domain.jpa.TB_ProductOrder ... assignOrders){
		if(this.assignOrders == null){
			this.assignOrders = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_ProductOrder bean : assignOrders){
			bean.setAssignor(this);
			this.assignOrders.add(bean);
		}
		return this;
	}
	/** add[SendOrders] */
	public TB_BranchCompanyStaff addSendOrders(bairui.international.model.domain.jpa.TB_ProductOrder ... sendOrders){
		if(this.sendOrders == null){
			this.sendOrders = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_ProductOrder bean : sendOrders){
			bean.setSender(this);
			this.sendOrders.add(bean);
		}
		return this;
	}
	/** add[BranchCompanyStaffRoyaltyRecords] */
	public TB_BranchCompanyStaff addBranchCompanyStaffRoyaltyRecords(bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord ... branchCompanyStaffRoyaltyRecords){
		if(this.branchCompanyStaffRoyaltyRecords == null){
			this.branchCompanyStaffRoyaltyRecords = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord bean : branchCompanyStaffRoyaltyRecords){
			bean.setBranchCompanyStaff(this);
			this.branchCompanyStaffRoyaltyRecords.add(bean);
		}
		return this;
	}
	/** add[BranchCompanyStaffMoneyRecords] */
	public TB_BranchCompanyStaff addBranchCompanyStaffMoneyRecords(bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord ... branchCompanyStaffMoneyRecords){
		if(this.branchCompanyStaffMoneyRecords == null){
			this.branchCompanyStaffMoneyRecords = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord bean : branchCompanyStaffMoneyRecords){
			bean.setBranchCompanyStaff(this);
			this.branchCompanyStaffMoneyRecords.add(bean);
		}
		return this;
	}
	/** add[BranchCompanyStaffWithdrawOrders] */
	public TB_BranchCompanyStaff addBranchCompanyStaffWithdrawOrders(bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder ... branchCompanyStaffWithdrawOrders){
		if(this.branchCompanyStaffWithdrawOrders == null){
			this.branchCompanyStaffWithdrawOrders = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder bean : branchCompanyStaffWithdrawOrders){
			bean.setBranchCompanyStaff(this);
			this.branchCompanyStaffWithdrawOrders.add(bean);
		}
		return this;
	}
	/** add[BranchCompanyMoneyRecords] */
	public TB_BranchCompanyStaff addBranchCompanyMoneyRecords(bairui.international.model.domain.jpa.TB_BranchCompanyMoneyRecord ... branchCompanyMoneyRecords){
		if(this.branchCompanyMoneyRecords == null){
			this.branchCompanyMoneyRecords = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyMoneyRecord bean : branchCompanyMoneyRecords){
			bean.setBranchCompanyStaff(this);
			this.branchCompanyMoneyRecords.add(bean);
		}
		return this;
	}
	/** add[BranchCompanyWithdrawOrders] */
	public TB_BranchCompanyStaff addBranchCompanyWithdrawOrders(bairui.international.model.domain.jpa.TB_BranchCompanyWithdrawOrder ... branchCompanyWithdrawOrders){
		if(this.branchCompanyWithdrawOrders == null){
			this.branchCompanyWithdrawOrders = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyWithdrawOrder bean : branchCompanyWithdrawOrders){
			bean.setBranchCompanyStaff(this);
			this.branchCompanyWithdrawOrders.add(bean);
		}
		return this;
	}
	/** add[VerifiedWithdrawOrders] */
	public TB_BranchCompanyStaff addVerifiedWithdrawOrders(bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder ... verifiedWithdrawOrders){
		if(this.verifiedWithdrawOrders == null){
			this.verifiedWithdrawOrders = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder bean : verifiedWithdrawOrders){
			bean.setVerifior(this);
			this.verifiedWithdrawOrders.add(bean);
		}
		return this;
	}
	/** add[Customers] */
	public TB_BranchCompanyStaff addCustomers(bairui.international.model.domain.jpa.TB_User ... customers){
		if(this.customers == null){
			this.customers = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_User bean : customers){
			bean.setSender(this);
			this.customers.add(bean);
		}
		return this;
	}
	
	/** remove[Nexts] */
	public TB_BranchCompanyStaff removeNexts(bairui.international.model.domain.jpa.TB_BranchCompanyStaff ... nexts){
		if(this.nexts == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaff bean : nexts){
			bean.setPrev(null);
			this.nexts.remove(bean);
		}
		return this;
	}
	/** remove[AssignOrders] */
	public TB_BranchCompanyStaff removeAssignOrders(bairui.international.model.domain.jpa.TB_ProductOrder ... assignOrders){
		if(this.assignOrders == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_ProductOrder bean : assignOrders){
			bean.setAssignor(null);
			this.assignOrders.remove(bean);
		}
		return this;
	}
	/** remove[SendOrders] */
	public TB_BranchCompanyStaff removeSendOrders(bairui.international.model.domain.jpa.TB_ProductOrder ... sendOrders){
		if(this.sendOrders == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_ProductOrder bean : sendOrders){
			bean.setSender(null);
			this.sendOrders.remove(bean);
		}
		return this;
	}
	/** remove[BranchCompanyStaffRoyaltyRecords] */
	public TB_BranchCompanyStaff removeBranchCompanyStaffRoyaltyRecords(bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord ... branchCompanyStaffRoyaltyRecords){
		if(this.branchCompanyStaffRoyaltyRecords == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord bean : branchCompanyStaffRoyaltyRecords){
			bean.setBranchCompanyStaff(null);
			this.branchCompanyStaffRoyaltyRecords.remove(bean);
		}
		return this;
	}
	/** remove[BranchCompanyStaffMoneyRecords] */
	public TB_BranchCompanyStaff removeBranchCompanyStaffMoneyRecords(bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord ... branchCompanyStaffMoneyRecords){
		if(this.branchCompanyStaffMoneyRecords == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord bean : branchCompanyStaffMoneyRecords){
			bean.setBranchCompanyStaff(null);
			this.branchCompanyStaffMoneyRecords.remove(bean);
		}
		return this;
	}
	/** remove[BranchCompanyStaffWithdrawOrders] */
	public TB_BranchCompanyStaff removeBranchCompanyStaffWithdrawOrders(bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder ... branchCompanyStaffWithdrawOrders){
		if(this.branchCompanyStaffWithdrawOrders == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder bean : branchCompanyStaffWithdrawOrders){
			bean.setBranchCompanyStaff(null);
			this.branchCompanyStaffWithdrawOrders.remove(bean);
		}
		return this;
	}
	/** remove[BranchCompanyMoneyRecords] */
	public TB_BranchCompanyStaff removeBranchCompanyMoneyRecords(bairui.international.model.domain.jpa.TB_BranchCompanyMoneyRecord ... branchCompanyMoneyRecords){
		if(this.branchCompanyMoneyRecords == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyMoneyRecord bean : branchCompanyMoneyRecords){
			bean.setBranchCompanyStaff(null);
			this.branchCompanyMoneyRecords.remove(bean);
		}
		return this;
	}
	/** remove[BranchCompanyWithdrawOrders] */
	public TB_BranchCompanyStaff removeBranchCompanyWithdrawOrders(bairui.international.model.domain.jpa.TB_BranchCompanyWithdrawOrder ... branchCompanyWithdrawOrders){
		if(this.branchCompanyWithdrawOrders == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyWithdrawOrder bean : branchCompanyWithdrawOrders){
			bean.setBranchCompanyStaff(null);
			this.branchCompanyWithdrawOrders.remove(bean);
		}
		return this;
	}
	/** remove[VerifiedWithdrawOrders] */
	public TB_BranchCompanyStaff removeVerifiedWithdrawOrders(bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder ... verifiedWithdrawOrders){
		if(this.verifiedWithdrawOrders == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder bean : verifiedWithdrawOrders){
			bean.setVerifior(null);
			this.verifiedWithdrawOrders.remove(bean);
		}
		return this;
	}
	/** remove[Customers] */
	public TB_BranchCompanyStaff removeCustomers(bairui.international.model.domain.jpa.TB_User ... customers){
		if(this.customers == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_User bean : customers){
			bean.setSender(null);
			this.customers.remove(bean);
		}
		return this;
	}
	
	/**
	 * contains[Nexts]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsNexts(bairui.international.model.domain.jpa.TB_BranchCompanyStaff ... nexts){
		if(this.nexts == null || nexts==null || nexts.length<=0){
			return false;
		}
		return this.nexts.containsAll(java.util.Arrays.asList(nexts));
	}
	/**
	 * contains[AssignOrders]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsAssignOrders(bairui.international.model.domain.jpa.TB_ProductOrder ... assignOrders){
		if(this.assignOrders == null || assignOrders==null || assignOrders.length<=0){
			return false;
		}
		return this.assignOrders.containsAll(java.util.Arrays.asList(assignOrders));
	}
	/**
	 * contains[SendOrders]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsSendOrders(bairui.international.model.domain.jpa.TB_ProductOrder ... sendOrders){
		if(this.sendOrders == null || sendOrders==null || sendOrders.length<=0){
			return false;
		}
		return this.sendOrders.containsAll(java.util.Arrays.asList(sendOrders));
	}
	/**
	 * contains[BranchCompanyStaffRoyaltyRecords]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsBranchCompanyStaffRoyaltyRecords(bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord ... branchCompanyStaffRoyaltyRecords){
		if(this.branchCompanyStaffRoyaltyRecords == null || branchCompanyStaffRoyaltyRecords==null || branchCompanyStaffRoyaltyRecords.length<=0){
			return false;
		}
		return this.branchCompanyStaffRoyaltyRecords.containsAll(java.util.Arrays.asList(branchCompanyStaffRoyaltyRecords));
	}
	/**
	 * contains[BranchCompanyStaffMoneyRecords]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsBranchCompanyStaffMoneyRecords(bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord ... branchCompanyStaffMoneyRecords){
		if(this.branchCompanyStaffMoneyRecords == null || branchCompanyStaffMoneyRecords==null || branchCompanyStaffMoneyRecords.length<=0){
			return false;
		}
		return this.branchCompanyStaffMoneyRecords.containsAll(java.util.Arrays.asList(branchCompanyStaffMoneyRecords));
	}
	/**
	 * contains[BranchCompanyStaffWithdrawOrders]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsBranchCompanyStaffWithdrawOrders(bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder ... branchCompanyStaffWithdrawOrders){
		if(this.branchCompanyStaffWithdrawOrders == null || branchCompanyStaffWithdrawOrders==null || branchCompanyStaffWithdrawOrders.length<=0){
			return false;
		}
		return this.branchCompanyStaffWithdrawOrders.containsAll(java.util.Arrays.asList(branchCompanyStaffWithdrawOrders));
	}
	/**
	 * contains[BranchCompanyMoneyRecords]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsBranchCompanyMoneyRecords(bairui.international.model.domain.jpa.TB_BranchCompanyMoneyRecord ... branchCompanyMoneyRecords){
		if(this.branchCompanyMoneyRecords == null || branchCompanyMoneyRecords==null || branchCompanyMoneyRecords.length<=0){
			return false;
		}
		return this.branchCompanyMoneyRecords.containsAll(java.util.Arrays.asList(branchCompanyMoneyRecords));
	}
	/**
	 * contains[BranchCompanyWithdrawOrders]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsBranchCompanyWithdrawOrders(bairui.international.model.domain.jpa.TB_BranchCompanyWithdrawOrder ... branchCompanyWithdrawOrders){
		if(this.branchCompanyWithdrawOrders == null || branchCompanyWithdrawOrders==null || branchCompanyWithdrawOrders.length<=0){
			return false;
		}
		return this.branchCompanyWithdrawOrders.containsAll(java.util.Arrays.asList(branchCompanyWithdrawOrders));
	}
	/**
	 * contains[VerifiedWithdrawOrders]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsVerifiedWithdrawOrders(bairui.international.model.domain.jpa.TB_BranchCompanyStaffWithdrawOrder ... verifiedWithdrawOrders){
		if(this.verifiedWithdrawOrders == null || verifiedWithdrawOrders==null || verifiedWithdrawOrders.length<=0){
			return false;
		}
		return this.verifiedWithdrawOrders.containsAll(java.util.Arrays.asList(verifiedWithdrawOrders));
	}
	/**
	 * contains[Customers]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsCustomers(bairui.international.model.domain.jpa.TB_User ... customers){
		if(this.customers == null || customers==null || customers.length<=0){
			return false;
		}
		return this.customers.containsAll(java.util.Arrays.asList(customers));
	}
	

	/** take[用户] */
	public bairui.international.model.domain.jpa.TB_User takeUser(){
		if(null == this.user){
			this.user = new bairui.international.model.domain.jpa.TB_User();
		}
		return this.user;
	}
	
	/** take[分公司] */
	public bairui.international.model.domain.jpa.TB_BranchCompany takeBranchCompany(){
		if(null == this.branchCompany){
			this.branchCompany = new bairui.international.model.domain.jpa.TB_BranchCompany();
		}
		return this.branchCompany;
	}
	
	/** take[上级] */
	public bairui.international.model.domain.jpa.TB_BranchCompanyStaff takePrev(){
		if(null == this.prev){
			this.prev = new bairui.international.model.domain.jpa.TB_BranchCompanyStaff();
		}
		return this.prev;
	}
	
	/** take[创建者] */
	public bairui.international.model.domain.jpa.TB_Admin takeCreator(){
		if(null == this.creator){
			this.creator = new bairui.international.model.domain.jpa.TB_Admin();
		}
		return this.creator;
	}
	
	/** take[最后修改者] */
	public bairui.international.model.domain.jpa.TB_Admin takeLastModifier(){
		if(null == this.lastModifier){
			this.lastModifier = new bairui.international.model.domain.jpa.TB_Admin();
		}
		return this.lastModifier;
	}
	
	/** must[用户] */
	public bairui.international.model.domain.jpa.TB_User mustUser() {
		return this.user;
	}
	
	/** must[分公司] */
	public bairui.international.model.domain.jpa.TB_BranchCompany mustBranchCompany() {
		return this.branchCompany;
	}
	
	/** optional[上级] */
	public java.util.Optional<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> optionalPrev() {
		return java.util.Optional.ofNullable(this.prev);
	}
	
	/** optional[创建者] */
	public java.util.Optional<bairui.international.model.domain.jpa.TB_Admin> optionalCreator() {
		return java.util.Optional.ofNullable(this.creator);
	}
	
	/** optional[最后修改者] */
	public java.util.Optional<bairui.international.model.domain.jpa.TB_Admin> optionalLastModifier() {
		return java.util.Optional.ofNullable(this.lastModifier);
	}
	

	/**
	 * 复写 hashCode
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		return prime * result + ((this.getId() == null) ? 0 : this.getId().hashCode());
	}
	
	/**
	 * 复写 equals
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj){
			return true;
		}
		if (obj == null){
			return false;
		}
		if (getClass() != obj.getClass()){
			return false;
		}
		TB_BranchCompanyStaff other = (TB_BranchCompanyStaff) obj;
		if (this.getId() == null) {
			return false;
		} else if (!this.getId().equals(other.getId())){
			return false;
		}
		return true;
	}
	

	/**
	 * 用来覆盖toString()的输出
	 */
	@javax.persistence.Transient
	private String toString;
	
	public void setToString(String toString) {
		this.toString = toString;
	}
	
	/**
	 * 复写 toString
	 */
	@Override
	public String toString() {
		if(null != this.toString){
			return this.toString;
		}
		return super.toString();
	}	

	@javax.persistence.PrePersist
	public void prePersist() {
		com.lianjing.sh.web.security.authority.login.LoginUserInfo userInfo = com.lianjing.sh.web.security.authority.login.Util_Login.getInfo();
		Object user = null == userInfo ? null : userInfo.getUser();
		this.setCreateTime(new java.util.Date());
		this.setModifyTime(new java.util.Date());
		this.setCreator((bairui.international.model.domain.jpa.TB_Admin)user);
		this.setLastModifier((bairui.international.model.domain.jpa.TB_Admin)user);
	}
	
	@javax.persistence.PreUpdate
	public void preUpdate() {
		com.lianjing.sh.web.security.authority.login.LoginUserInfo userInfo = com.lianjing.sh.web.security.authority.login.Util_Login.getInfo();
		Object user = null == userInfo ? null : userInfo.getUser();
		this.setModifyTime(new java.util.Date());
		this.setLastModifier((bairui.international.model.domain.jpa.TB_Admin)user);
	}



}
